# Virtual Router Simulator 
#
# Copyright (C) 2009-2010 VRSim Project
# Author: Choonho Son <choonho@kt.com>
# URL: <http://vrsim.googlecode.com>
# For license information, see LICENSE.TXT
#

import VRSim.Globals as globals
from VRSim.Utils import debug

from VRSim.Node.Router import Router
from VRSim.Node.Domain import Domain


import subprocess as sub

class Juniper_M40(Router,  Domain):
    def __init__(self,  nodeid):
        Router.__init__(self,  nodeid)
        Domain.__init__(self,  nodeid=nodeid)
        self.model = "Juniper M40"
        self.hostname = "Juniper"
        
        # update initial hdd image
        self.devices.hdd.source = "%s/%s/%s" % (globals.BASEDIR, globals.GApp.userid, globals.IMG_M40)
        

        # temp
        self.cmd1 = "/usr/local/bin/qemu-system-x86_64 -no-acpi -m 256 -nographic /data/olive9_0.img -k en-us -net nic,vlan=2,model=i82559er -net socket,vlan=2,udp=10000:127.0.0.1:10001"
        

    def updateHostname(self,  name):
        self.hostname = name
        self.name = name
        #update Domain name
        #self.domain.name = name
        

